<template>
    <a-form :form="form" @submit="handleSubmit">

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="血型"
      >
        <a-input
          v-decorator="[
            'bloodType',{initialValue:''}
          ]"
          placeholder="请输入您的血型"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="身高(厘米)"
      >
        <a-input
          v-decorator="[
            'stature',{initialValue:''}
          ]"
          placeholder="请输入您的身高(厘米)"
        />
      </a-form-item>
      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="体重(公斤)"
      >
        <a-input
          v-decorator="[
            'weight',{initialValue:''}
          ]"
          placeholder="请输入您的体重(公斤)"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="籍贯"
      >
        <a-input
          v-decorator="[
            'nativePlace',{initialValue:''}
          ]"
          placeholder="请输入您的籍贯"
        />
      </a-form-item>
      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="家庭住址"
      >
        <a-input
          v-decorator="[
            'address',{initialValue:''}
          ]"
          placeholder="请输入您的家庭住址"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="外语语种及程度"
      >
        <a-input
          v-decorator="[
            'languages',{initialValue:''}
          ]"
          placeholder="请输入您的外语语种及程度"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="计算机等级"
      >
        <a-input
          v-decorator="[
            'NCRE',{initialValue:''}
          ]"
          placeholder="请输入您的计算机等级"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="职称"
      >
        <a-input
          v-decorator="[
            'positionalTitles',{initialValue:''}
          ]"
          placeholder="请输入您的职称"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="特长描述"
      >
        <a-input
          v-decorator="[
            'specialSkill',{initialValue:''}
          ]"
          placeholder="请输入您的特长描述"
        />
      </a-form-item>

      <a-form-item
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol"
        label="个人爱好"
      >
        <a-input
          v-decorator="[
            'personalHobbies',{initialValue:''}
          ]"
          placeholder="请输入您的个人爱好"
        />
      </a-form-item>
      

      <a-form-item label="政治面貌" has-feedback
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol">
        <a-select
            v-decorator="[
            'politicalOutlook',{initialValue:''}
            ]"
            placeholder="请选择您的政治面貌"
        >
            <a-select-option value="群众">
            群众
            </a-select-option>
            <a-select-option value="共青团员">
            共青团员
            </a-select-option>
            <a-select-option value="党员">
            党员
            </a-select-option>
            <a-select-option value="其他">
            其他
            </a-select-option>
        </a-select>
        </a-form-item>
        <a-form-item label="婚育情况" has-feedback
        :label-col="formItemLayout.labelCol"
        :wrapper-col="formItemLayout.wrapperCol">
            <a-select
                v-decorator="[
                'isMarry',{initialValue:''}
                ]"
                placeholder="请选择您的婚育情况"
            >
                <a-select-option value="未婚">
                未婚
                </a-select-option>
                <a-select-option value="已婚">
                已婚
                </a-select-option>
                <a-select-option value="其他">
                其他
                </a-select-option>
            </a-select>
        </a-form-item>

      

        
      <!-- <a-form-item v-bind="tailFormItemLayout">
        <a-button type="primary" html-type="submit">
          Register
        </a-button>
      </a-form-item> -->
    </a-form>
  </template>
  <script>
  export default {
    name: 'App',
    components: {
    },
    data() {
      return {
        
        confirmDirty: false,
        autoCompleteResult: [],
        isOrNotLeaveOffice:'',
        NDA:'',
        
        formItemLayout: {
          labelCol: {
            xs: { span: 24 },
            sm: { span: 4 },
          },
          wrapperCol: {
            xs: { span: 24 },
            sm: { span: 16 },
          },
        },
        tailFormItemLayout: {
          wrapperCol: {
            xs: {
              span: 24,
              offset: 0,
            },
            sm: {
              span: 16,
              offset: 8,
            },
          },
        },
        secondvalues:{
            secondpassby:0

        }
      };
    },
    beforeCreate() {
      this.form = this.$form.createForm(this, { name: 'second' });
    },
    methods: {
      onChange(date, dateString) {
        console.log(date, dateString);
      },
      handleSubmit(e) {
        e.preventDefault();
        this.form.validateFieldsAndScroll((err, fieldsValue) => {
          if (!err) {
            const secondvalues = {
            ...fieldsValue
          }
            console.log('Received values of form: ', secondvalues);
            this.secondvalues = secondvalues
            this.secondvalues.secondpassby = 1
            // this.$router.push({path:"/submit"})
          }
        });
      },
      handleConfirmBlur(e) {
        const value = e.target.value;
        this.confirmDirty = this.confirmDirty || !!value;
      },
    },
  };
  </script>